package cn.getech.data.development.constant;

import com.google.common.collect.Lists;
import lombok.Getter;

import java.util.List;

@Getter
public enum DataFormat {

    text("text"),
    json("json"),
    parquet("parquet");

    DataFormat(String name) {
        this.name = name;
    }


    private String name;

    public static List<String> getValues(Integer type) {
        List<String> values = Lists.newArrayList();
        for (DataFormat value : DataFormat.values()) {
            if (type != null && type == 2) {//实时表
                if (!value.getName().equals("parquet")) {
                    values.add(value.getName());
                }
            } else {
                values.add(value.getName());
            }
        }
        return values;
    }
}
